import fetch from '@/utils/fetch'

export function apiAddProductionOrder(orderDto) {
  return fetch({
    url: '/api/v1/warranty/order',
    method: 'post',
    data: orderDto
  })
}

export function apiGetProductionOrderList(listQuery) {
  return fetch({
    url: '/api/v1/warranty/order/list',
    method: 'get',
    params: listQuery
  })
}

export function apiUpdProductionOrder(orderDto) {
  return fetch({
    url: '/api/v1/warranty/order',
    method: 'put',
    data: orderDto
  })
}

export function apiGetProductionOrderById(listQuery) {
  return fetch({
    url: '/api/v1/warranty/order',
    method: 'get',
    params: listQuery
  })
}

export function apiDelProdcutionOrder(listQuery) {
  return fetch({
    url: '/api/v1/warranty/order',
    method: 'delete',
    params: listQuery
  })
}
